package com.lagou.dubbo.service;

import com.lagou.dubbo.common.Constants;
import org.apache.dubbo.rpc.RpcContext;

public interface BaseService {
    default void printIP() {
        String requestIP = RpcContext.getContext().getAttachment(Constants.REQUEST_IP);
        RpcContext.getContext().clearAttachments();
        System.out.println(this.getClass().getSimpleName() + ":" + Constants.REQUEST_IP + "=" + requestIP);
    }
}
